/* $Id: HelpMenuUnitTest.java 63 2010-02-14 13:52:34Z aaron.day $ */
package org.crazydays.gameplan.view;


import javax.swing.JMenuItem;

import org.junit.Test;
import static org.junit.Assert.*;

import org.crazydays.gameplan.action.OpenAboutDialog;

/**
 * HelpMenuUnitTest
 */
public class HelpMenuUnitTest
{
    /**
     * Test initialize().
     */
    @Test
    public void testInitialize()
    {
        // objects
        OpenAboutDialog openAboutDialog = new OpenAboutDialog();

        // setup
        HelpMenu component = new HelpMenu();
        component.setOpenAboutDialog(openAboutDialog);

        // test
        component.initialize();

        // verify
        assertEquals("count", 1, component.getMenuComponentCount());
        assertTrue("openAboutDialog",
            component.getMenuComponent(0) instanceof JMenuItem);
        assertEquals("openAboutDialog", openAboutDialog, ((JMenuItem) component
            .getMenuComponent(0)).getAction());
    }
}
